package com.hboxs.asl.entity;

import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.util.Date;

/**
 * Entity - 限时抢购
 */
@Entity
@Table(name = "xx_rush")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_rush_sequence")
public class Rush extends BaseEntity {

    private static final long serialVersionUID = -4837679134458234960L;

    public Rush() {
    }

    public Rush(Product product, Date beginDate, Date endDate) {
        this.product = product;
        this.beginDate = beginDate;
        this.endDate = endDate;
    }

    private Product product;

    private Date beginDate;

    private Date endDate;

    private Boolean enable;

    @OneToOne
    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }
}
